{extend name="$BASE_POPUP_FORM" /}
{block name="body"}
<div class="box-content">
    <input type="hidden" name="id" id="id" value="{$id}"/>

    <div class="control-row col-2">
        <div class="control-group">
            <label class="control-label">用户名</label>
            <div class="controls">
                <input type="text" id="username" name="username" class="form-control required"/>
            </div>
        </div>
        <div class="control-group">
            <label class="control-label">手机号</label>
            <div class="controls">
                <input type="text" id="phone" name="phone" class="form-control"/>
            </div>
        </div>
        <div class="control-group">
            <label class="control-label">邮箱</label>
            <div class="controls">
                <input type="text" id="email" name="email" class="form-control"/>
            </div>
        </div>
        
<!--        <div class="control-group">-->
<!--            <label class="control-label">实名认证</label>-->
<!--            <div class="controls">-->
<!--                <select name="is_auth" id="is_auth" class="form-control">-->
<!--&lt;!&ndash;                    <option value="-1">不通过</option>&ndash;&gt;-->
<!--                    <option value="0">未认证</option>-->
<!--                    <option value="1">已认证</option>-->
<!--&lt;!&ndash;                    <option value="2">待认证</option>&ndash;&gt;-->
<!--                </select>-->
<!--            </div>-->
<!--        </div>-->
        <div class="control-group">
            <label class="control-label">推荐上级用户</label>
            <div class="controls">
                <input id="pid" name="pid" data-ui="combosearch"
                       data-options="{valueField:'id',textField:'phone',showList:true,matchFields:['phone'],data:user_data,searchWin:openSearchWin}"
                       class="form-control"/>
            </div>
        </div>
        <div class="control-group">
            <label class="control-label">状态</label>
            <div class="controls">
                <select name="is_frozen" id="is_frozen" class="form-control">
                    <option value="0">正常</option>
                    <option value="1">冻结</option>
                </select>
            </div>
        </div>
        <div class="control-group">
            <label class="control-label">是否演员</label>
            <div class="controls">
                <select name="is_actor" id="is_actor" class="form-control">
                    <option value="0">否</option>
                    <option value="1">是</option>
                </select>
            </div>
        </div>
<!--        <div class="control-group">-->
<!--            <label class="control-label">性别</label>-->
<!--            <div class="controls">-->
<!--                <select name="birthday" id="birthday" class="form-control">-->
<!--                    <option value="0">保密</option>-->
<!--                    <option value="1">男</option>-->
<!--                    <option value="2">女</option>-->
<!--                </select>-->
<!--            </div>-->
<!--        </div>-->
        <div class="control-group">
            <label class="control-label">等级</label>
            <div class="controls">
                <select name="level" id="level" class="form-control">
                    <option value="0">普通用户</option>
                    <option value="1">区级</option>
                    <option value="2">市级</option>
                    <option value="3">省级</option>
<!--                     <option value="4">网红</option>
                    <option value="5">明星</option>
                    <option value="6">巨星</option>
 -->                </select>
            </div>
        </div>
        <div class="control-group">
            <label class="control-label">登录密码</label>
            <div class="controls">
                <input type="text" name="now_password" class="form-control" placeholder="不修改密码请勿填写"/>
            </div>
        </div>
        <div class="control-group">
            <label class="control-label">支付密码</label>
            <div class="controls">
                <input type="text" name="now_pay_password" class="form-control" placeholder="不修改密码请勿填写"/>
            </div>
        </div>
    </div>
</div>
{/block}

{block name="script"}
<script type="text/javascript">
    /**
     * 点击图片删除
     * */
    $('#js_upload_wrp').on("click", ".js_delete", function (e) {
        var _this = $(this);
        _this.parents(".js_edit_pic_wrp").remove();
        // setPicValue()
    });
    /**
     * 添加图片
     */
    function uploadImgWechat(data) {
        $("#wechat_account").val(data);
        // setPicValue("wechat_account",data);
    }
    function uploadImgAlipay(data) {
        $("#alipay_account").val(data);
        // setPicValue("alipay_account",data);
    }

    function onLoadDataSuccess(data) {
        if (typeof (onLoadSuccess) !== "undefined")
            onLoadSuccess();
        // setPicValue("wechat_account", data['wechat_account']);
        // setPicValue("alipay_account", data['alipay_account']);
    }

    var user_data = {$user_list};

    function openSearchWin() {
        var url = getURL('member/select_user', '', 'member');
        openBarWinParent('选择用户', 500, 600, url, function (data) {
            $("#pid").setValue(data);
        }, ['选定', '取消']);
    }

    function centerOpenSearchWin() {
        var url = getURL('member/select_user', '', 'member');
        openBarWinParent('选择用户', 500, 600, url, function (data) {
            $("#center_id").setValue(data);
        }, ['选定', '取消']);
    }

    function jdOpenSearchWin() {
        var url = getURL('member/select_user', '', 'member');
        openBarWinParent('选择用户', 500, 600, url, function (data) {
            $("#center_id").setValue(data);
        }, ['选定', '取消']);
    }

</script>
{/block}


